<!DOCTYPE html>
<html>
<head>
    

    

    



    <meta charset="utf-8">
    
    
    
    
    <title>爬虫| 基于高德api接口抓取景区/小区边界数据 | 一只咸鱼 | 努力学习最新姿势！！！</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="Python">
    <meta name="description" content="爬虫网络爬虫（又被称为网页蜘蛛，网络机器人，在FOAF社区中间，更经常的称为网页追逐者），是一种按照一定的规则，自动地抓取万维网信息的程序或者脚本。另外一些不常使用的名字还有蚂蚁、自动索引、模拟程序或者蠕虫。 Python爬虫Python，丰富的第三方库十分强大，简单几行代码便可实现你想要的功能，更重要的，Python也是数据挖掘和分析的好能手。这样爬取数据和分析数据一条龙的服务都用Python">
<meta property="og:type" content="article">
<meta property="og:title" content="爬虫| 基于高德api接口抓取景区&#x2F;小区边界数据">
<meta property="og:url" content="http://yoursite.com/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8E%E9%AB%98%E5%BE%B7api%E6%8E%A5%E5%8F%A3%E6%8A%93%E5%8F%96%E6%99%AF%E5%8C%BA-%E5%B0%8F%E5%8C%BA%E8%BE%B9%E7%95%8C%E6%95%B0%E6%8D%AE/index.html">
<meta property="og:site_name" content="一只咸鱼">
<meta property="og:description" content="爬虫网络爬虫（又被称为网页蜘蛛，网络机器人，在FOAF社区中间，更经常的称为网页追逐者），是一种按照一定的规则，自动地抓取万维网信息的程序或者脚本。另外一些不常使用的名字还有蚂蚁、自动索引、模拟程序或者蠕虫。 Python爬虫Python，丰富的第三方库十分强大，简单几行代码便可实现你想要的功能，更重要的，Python也是数据挖掘和分析的好能手。这样爬取数据和分析数据一条龙的服务都用Python">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://img-blog.csdnimg.cn/2019010410201027.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MDkwMjUyNw==,size_16,color_FFFFFF,t_70">
<meta property="og:image" content="https://img-blog.csdnimg.cn/2019010410383526.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MDkwMjUyNw==,size_16,color_FFFFFF,t_70">
<meta property="og:image" content="https://img-blog.csdnimg.cn/20190104103837219.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MDkwMjUyNw==,size_16,color_FFFFFF,t_70">
<meta property="og:image" content="https://img-blog.csdnimg.cn/20190104104204104.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MDkwMjUyNw==,size_16,color_FFFFFF,t_70">
<meta property="article:published_time" content="2020-04-06T07:10:00.000Z">
<meta property="article:modified_time" content="2020-04-11T00:54:59.463Z">
<meta property="article:author" content="Mr.Zhang">
<meta property="article:tag" content="Python">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://img-blog.csdnimg.cn/2019010410201027.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MDkwMjUyNw==,size_16,color_FFFFFF,t_70">
    
        <link rel="alternate" type="application/atom+xml" title="一只咸鱼" href="/atom.xml">
    
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

<meta name="generator" content="Hexo 4.2.0"></head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/avatar.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">Mr.Zhang</h5>
          <a href="mailto:zhangticcc@163.com" title="zhangticcc@163.com" class="mail">zhangticcc@163.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                首页
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                时间轴
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                标签
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/categories"  >
                <i class="icon icon-lg icon-th-list"></i>
                分类
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://weibo.com/u/5392412243" target="_blank" >
                <i class="icon icon-lg icon-weibo"></i>
                微博
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/zhangti0708" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                开源地址
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://blog.csdn.net/weixin_40902527" target="_blank" >
                <i class="icon icon-lg icon-rss"></i>
                技术博客
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="http://zhangticcc.gitee.io/webgis/" target="_blank" >
                <i class="icon icon-lg icon-globe"></i>
                GIS案例
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://mp.weixin.qq.com/s/p4TOhKcr4RZkZWzuMYyBEQ" target="_blank" >
                <i class="icon icon-lg icon-weixin"></i>
                微信订阅号
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">爬虫| 基于高德api接口抓取景区/小区边界数据</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">爬虫| 基于高德api接口抓取景区/小区边界数据</h1>
        <h5 class="subtitle">
            
                <time datetime="2020-04-06T07:10:00.000Z" itemprop="datePublished" class="page-time">
  2020-04-06
</time>


	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/%E7%88%AC%E8%99%AB/">爬虫</a></li></ul>

            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap post-toc-shrink" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#爬虫"><span class="post-toc-number">1.</span> <span class="post-toc-text">爬虫</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#Python爬虫"><span class="post-toc-number">1.1.</span> <span class="post-toc-text">Python爬虫</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#工作流程"><span class="post-toc-number">1.2.</span> <span class="post-toc-text">工作流程</span></a></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#爬虫框架-Scrapy"><span class="post-toc-number">1.3.</span> <span class="post-toc-text">爬虫框架(Scrapy)</span></a></li></ol></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#爬取高德数据边界"><span class="post-toc-number">2.</span> <span class="post-toc-text">爬取高德数据边界</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-6"><a class="post-toc-link" href="#高德api接口地址："><span class="post-toc-number">2.0.0.1.</span> <span class="post-toc-text">高德api接口地址：</span></a></li></ol></li><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#爬取思路"><span class="post-toc-number">2.0.1.</span> <span class="post-toc-text">爬取思路</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-6"><a class="post-toc-link" href="#通过高德搜索接口得到附近小区搜索列表"><span class="post-toc-number">2.0.1.1.</span> <span class="post-toc-text">通过高德搜索接口得到附近小区搜索列表</span></a></li><li class="post-toc-item post-toc-level-6"><a class="post-toc-link" href="#爬取方案"><span class="post-toc-number">2.0.1.2.</span> <span class="post-toc-text">爬取方案</span></a></li></ol></li></ol></li><li class="post-toc-item post-toc-level-4"><a class="post-toc-link" href="#常见问题"><span class="post-toc-number">2.1.</span> <span class="post-toc-text">常见问题</span></a></li></ol></li></ol>
        </nav>
    </aside>


<article id="post-爬虫-基于高德api接口抓取景区-小区边界数据"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">爬虫| 基于高德api接口抓取景区/小区边界数据</h1>
        <div class="post-meta">
            <time class="post-time" title="2020-04-06 15:10:00" datetime="2020-04-06T07:10:00.000Z"  itemprop="datePublished">2020-04-06</time>

            
	<ul class="article-category-list"><li class="article-category-list-item"><a class="article-category-list-link" href="/categories/%E7%88%AC%E8%99%AB/">爬虫</a></li></ul>



            
<span id="busuanzi_container_page_pv" title="文章总阅读量" style='display:none'>
    <i class="icon icon-eye icon-pr"></i><span id="busuanzi_value_page_pv"></span>
</span>


        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <h3 id="爬虫"><a href="#爬虫" class="headerlink" title="爬虫"></a>爬虫</h3><p>网络爬虫（又被称为网页蜘蛛，网络机器人，在FOAF社区中间，更经常的称为网页追逐者），是一种按照一定的规则，自动地抓取万维网信息的程序或者脚本。另外一些不常使用的名字还有蚂蚁、自动索引、模拟程序或者蠕虫。</p>
<h4 id="Python爬虫"><a href="#Python爬虫" class="headerlink" title="Python爬虫"></a>Python爬虫</h4><p>Python，丰富的第三方库十分强大，简单几行代码便可实现你想要的功能，更重要的，Python也是数据挖掘和分析的好能手。这样爬取数据和分析数据一条龙的服务都用Python</p>
<h4 id="工作流程"><a href="#工作流程" class="headerlink" title="工作流程"></a>工作流程</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">抓取HTML页面：</span><br><span class="line">HTTP请求的处理： urllib, urlib2, requests 处理器的请求可以模拟浏览器发送请求，获取服务器响应的文件</span><br><span class="line"></span><br><span class="line">解析服务器相应的内容:</span><br><span class="line">re, xpath, BeautifulSoup(bs4), jsonpath, pyquery等使用某种描述性语言来给我们需要提取的数据定义一个匹配规则，符合这个规则的数据就会被匹配</span><br><span class="line"></span><br><span class="line">采集动态HTML，验证码的处理</span><br><span class="line">通用动态页面采集： Selenium + PhantomJS:模拟真实浏览器加载JS</span><br><span class="line">验证码处理: Tesseract机器学习库，机器图像识别系统</span><br></pre></td></tr></table></figure>

<h4 id="爬虫框架-Scrapy"><a href="#爬虫框架-Scrapy" class="headerlink" title="爬虫框架(Scrapy)"></a>爬虫框架(Scrapy)</h4><p>Scrapy框架 :</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">特点：</span><br><span class="line">  高定制性，高性能（异步网络框架twisted）-&gt;数据下载快，提供了数据存储，数据下载，提取规则等组件</span><br><span class="line"></span><br><span class="line"> 分布式策略：</span><br><span class="line">  scrapy redis：在scarpy基础上添加了以redis数据库为核心的一套组件,主要在redis做请求指纹去重、请求分配、数据临时存储</span><br><span class="line"></span><br><span class="line">爬虫、反爬虫、反反爬虫之间的斗争:</span><br><span class="line">  User-Agent, 代理, 验证码, 动态数据加载, 加密数据</span><br></pre></td></tr></table></figure>

<h3 id="爬取高德数据边界"><a href="#爬取高德数据边界" class="headerlink" title="爬取高德数据边界"></a>爬取高德数据边界</h3><h6 id="高德api接口地址："><a href="#高德api接口地址：" class="headerlink" title="高德api接口地址："></a>高德api接口地址：</h6><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">https:&#x2F;&#x2F;lbs.amap.com&#x2F;api&#x2F;webservice&#x2F;guide&#x2F;api&#x2F;search</span><br><span class="line"></span><br><span class="line">如果不是高德开发者可以申请为开发者</span><br><span class="line">第一步，申请”Web服务API”密钥（Key）；</span><br><span class="line">第二步，拼接HTTP请求URL，第一步申请的Key需作为必填参数一同发送；</span><br><span class="line">第三步，接收HTTP请求返回的数据（JSON或XML格式），解析数据。</span><br><span class="line">如无特殊声明，接口的输入参数和输出数据编码全部统一为UTF-8。</span><br></pre></td></tr></table></figure>

<h5 id="爬取思路"><a href="#爬取思路" class="headerlink" title="爬取思路"></a>爬取思路</h5><h6 id="通过高德搜索接口得到附近小区搜索列表"><a href="#通过高德搜索接口得到附近小区搜索列表" class="headerlink" title="通过高德搜索接口得到附近小区搜索列表"></a>通过高德搜索接口得到附近小区搜索列表</h6><p>解析后获取到正确小区的id。其中city是城市代码,可以通过浏览器手工获取到。words是搜索的具体风景区名称。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">https:&#x2F;&#x2F;restapi.amap.com&#x2F;v3&#x2F;place&#x2F;text?key&#x3D;4b86820a7590de60e4f81f53e59ae17f&amp;citylimit&#x3D;true&amp;output&#x3D;json&amp;</span><br></pre></td></tr></table></figure>


<p><code>key</code> 为申请的密钥，申请详细步骤文档有说明<br><code>keywords</code> 查询的关键词，如景区/小区名称<br><code>city</code> 查询的目标城市</p>
<p>示例 ：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">https:&#x2F;&#x2F;restapi.amap.com&#x2F;v3&#x2F;place&#x2F;text?key&#x3D;4b86820a7590de60e4f81f53e59ae17f&amp;citylimit&#x3D;true&amp;output&#x3D;json&amp;keywords&#x3D;中山陵景区&amp;city&#x3D;南京</span><br></pre></td></tr></table></figure>

<p>返回结果为json字符串<br><img alt="" class="has" height="250" src="https://img-blog.csdnimg.cn/2019010410201027.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MDkwMjUyNw==,size_16,color_FFFFFF,t_70" width="700"><br>提取景区/小区的<code>id</code>：<code>B0FFHVEECG</code></p>
<h6 id="爬取方案"><a href="#爬取方案" class="headerlink" title="爬取方案"></a>爬取方案</h6><p>方案1 ：<br>然后通过poiid调用另外一个接口查询该景区/小区</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">https:&#x2F;&#x2F;ditu.amap.com&#x2F;detail&#x2F;get&#x2F;detail?id&#x3D;B0FFHVEECG</span><br></pre></td></tr></table></figure>

<p>参数 <code>id</code> 填写上面获取到的 poiid=<code>B0FFHVEECG</code></p>
<p>请求返回结果：<br><img alt="" class="has" height="430" src="https://img-blog.csdnimg.cn/2019010410383526.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MDkwMjUyNw==,size_16,color_FFFFFF,t_70" width="700"><br>将返回的结果转成json然后逐层提取出来</p>
<p>存入数据库或者csv文档</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">def info(self, response):</span><br><span class="line">    meta &#x3D; response.meta</span><br><span class="line">    data &#x3D; json.loads(response.text)</span><br><span class="line">    print(data)</span><br><span class="line">    try:</span><br><span class="line">        if data[&quot;status&quot;] &#x3D;&#x3D; &quot;1&quot;:</span><br><span class="line">            spec &#x3D; data[&quot;data&quot;][&quot;spec&quot;]</span><br><span class="line">            border &#x3D; spec[&quot;mining_shape&quot;][&quot;shape&quot;]</span><br><span class="line">            print(&quot;border &quot;,border)</span><br><span class="line">            AllCityDataSQL().UpdateXcJingDianiData((meta[&quot;id&quot;]),border)</span><br><span class="line">    except:</span><br><span class="line">        print(&quot;查询错误~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&quot; + meta[&quot;url&quot;])</span><br></pre></td></tr></table></figure>

<p>方案2：</p>
<p> 通过<code>poiid</code>查找边界信息，红色部分可以替换成其他城市代码（身份证前6位）和景区id</p>
<p>接口地址：<code>https://gaode.com/service/poiInfo?query_type=IDQ&amp;pagesize=20&amp;pagenum=1&amp;qii=true&amp;cluster_state=5&amp;need_utd=true&amp;utd_sceneid=1000&amp;div=PC1000&amp;addr_poi_merge=true&amp;is_classify=true&amp;zoom=11&amp;id=B022F0071G&amp;city=341003</code></p>
<p>请求返回结果：<br><img alt="" class="has" height="430" src="https://img-blog.csdnimg.cn/20190104103837219.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MDkwMjUyNw==,size_16,color_FFFFFF,t_70" width="700"></p>
<p><code>value</code>字段 由一堆坐标组成的数值</p>
<img alt="" class="has" height="331" src="https://img-blog.csdnimg.cn/20190104104204104.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80MDkwMjUyNw==,size_16,color_FFFFFF,t_70" width="700">

<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">将返回的结果转成json ，然后逐层提取出来</span><br><span class="line">返回的value字段值还需修改一下，将_换成，才能使用</span><br><span class="line">存入数据库或者csv文档</span><br></pre></td></tr></table></figure>


<h4 id="常见问题"><a href="#常见问题" class="headerlink" title="常见问题"></a>常见问题</h4><p>高德的反扒机制：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">错误数据</span><br><span class="line">接口异常</span><br><span class="line">跳转第三方接口</span><br></pre></td></tr></table></figure>
<p>推荐使用ip代理搭建一个ip池：<br><a href="http://www.ztwow.top/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8Eredis%E6%90%AD%E5%BB%BAIP%E4%BB%A3%E7%90%86%E6%B1%A0/" target="_blank" rel="noopener">博客</a></p>
<p>常用反反爬机制：<br><a href="https://blog.csdn.net/weixin_40902527/article/details/87635071" target="_blank" rel="noopener">csdn地址</a></p>
<p>PhantomJS + selenium 防反爬：<br><a href="https://blog.csdn.net/weixin_40902527/article/details/857707501" target="_blank" rel="noopener">csdn地址</a></p>

        </div>

        <blockquote class="post-copyright">
    
    <div class="content">
        
<span class="post-time">
    最后更新时间：<time datetime="2020-04-11T00:54:59.463Z" itemprop="dateUpdated">2020-04-11 08:54:59</time>
</span><br>


        
        这里可以写作者留言，标签和 hexo 中所有变量及辅助函数等均可调用，示例：<a href="/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8E%E9%AB%98%E5%BE%B7api%E6%8E%A5%E5%8F%A3%E6%8A%93%E5%8F%96%E6%99%AF%E5%8C%BA-%E5%B0%8F%E5%8C%BA%E8%BE%B9%E7%95%8C%E6%95%B0%E6%8D%AE/" target="_blank" rel="external">http://yoursite.com/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8E%E9%AB%98%E5%BE%B7api%E6%8E%A5%E5%8F%A3%E6%8A%93%E5%8F%96%E6%99%AF%E5%8C%BA-%E5%B0%8F%E5%8C%BA%E8%BE%B9%E7%95%8C%E6%95%B0%E6%8D%AE/</a>
        
    </div>
    
    <footer>
        <a href="http://yoursite.com">
            <img src="/img/avatar.jpg" alt="Mr.Zhang">
            Mr.Zhang
        </a>
    </footer>
</blockquote>

        
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a>
</div>



        <div class="post-footer">
            
	<ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Python/" rel="tag">Python</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://yoursite.com/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8E%E9%AB%98%E5%BE%B7api%E6%8E%A5%E5%8F%A3%E6%8A%93%E5%8F%96%E6%99%AF%E5%8C%BA-%E5%B0%8F%E5%8C%BA%E8%BE%B9%E7%95%8C%E6%95%B0%E6%8D%AE/&title=《爬虫| 基于高德api接口抓取景区/小区边界数据》 — 一只咸鱼&pic=http://yoursite.com/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://yoursite.com/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8E%E9%AB%98%E5%BE%B7api%E6%8E%A5%E5%8F%A3%E6%8A%93%E5%8F%96%E6%99%AF%E5%8C%BA-%E5%B0%8F%E5%8C%BA%E8%BE%B9%E7%95%8C%E6%95%B0%E6%8D%AE/&title=《爬虫| 基于高德api接口抓取景区/小区边界数据》 — 一只咸鱼&source=分享各种福利和姿势..." data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://yoursite.com/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8E%E9%AB%98%E5%BE%B7api%E6%8E%A5%E5%8F%A3%E6%8A%93%E5%8F%96%E6%99%AF%E5%8C%BA-%E5%B0%8F%E5%8C%BA%E8%BE%B9%E7%95%8C%E6%95%B0%E6%8D%AE/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《爬虫| 基于高德api接口抓取景区/小区边界数据》 — 一只咸鱼&url=http://yoursite.com/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8E%E9%AB%98%E5%BE%B7api%E6%8E%A5%E5%8F%A3%E6%8A%93%E5%8F%96%E6%99%AF%E5%8C%BA-%E5%B0%8F%E5%8C%BA%E8%BE%B9%E7%95%8C%E6%95%B0%E6%8D%AE/&via=http://yoursite.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://yoursite.com/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8E%E9%AB%98%E5%BE%B7api%E6%8E%A5%E5%8F%A3%E6%8A%93%E5%8F%96%E6%99%AF%E5%8C%BA-%E5%B0%8F%E5%8C%BA%E8%BE%B9%E7%95%8C%E6%95%B0%E6%8D%AE/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8Eredis%E6%90%AD%E5%BB%BAIP%E4%BB%A3%E7%90%86%E6%B1%A0/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">爬虫|基于redis搭建IP代理池</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2020/04/06/%E5%9F%BA%E4%BA%8EspringBoot%E7%9A%84%E5%BC%80%E6%BA%90%E5%88%86%E5%B8%83%E5%BC%8F%E7%B3%BB%E7%BB%9F/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">Java|基于springBoot的开源分布式系统</h4>
      </a>
    </div>
  
</nav>



    




















</article>

<div id="reward" class="page-modal reward-lay">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <h3 class="reward-title">
        <i class="icon icon-quote-left"></i>
        谢谢大爷~
        <i class="icon icon-quote-right"></i>
    </h3>
    <div class="reward-content">
        
        <div class="reward-code">
            <img id="rewardCode" src="/img/wechat.jpg" alt="打赏二维码">
        </div>
        
        <label class="reward-toggle">
            <input id="rewardToggle" type="checkbox" class="reward-toggle-check"
                data-wechat="/img/wechat.jpg" data-alipay="/img/alipay.jpg">
            <div class="reward-toggle-ctrol">
                <span class="reward-toggle-item wechat">微信</span>
                <span class="reward-toggle-label"></span>
                <span class="reward-toggle-item alipay">支付宝</span>
            </div>
        </label>
        
    </div>
</div>



</div>

        <footer class="footer">
    <div class="top">
        
<p>
    <span id="busuanzi_container_site_uv" style='display:none'>
        站点总访客数：<span id="busuanzi_value_site_uv"></span>
    </span>
    <span id="busuanzi_container_site_pv" style='display:none'>
        站点总访问量：<span id="busuanzi_value_site_pv"></span>
    </span>
</p>


        <p>
            
                <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            
            <span>博客内容遵循 <a rel="license noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" target="_blank">知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议</a></span>
        </p>
    </div>
    <div class="bottom">
        <p><span>Mr.Zhang &copy; 2015 - 2020</span>
            <span>
                
                Power by <a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
            </span>
        </p>
    </div>
</footer>

    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=http://yoursite.com/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8E%E9%AB%98%E5%BE%B7api%E6%8E%A5%E5%8F%A3%E6%8A%93%E5%8F%96%E6%99%AF%E5%8C%BA-%E5%B0%8F%E5%8C%BA%E8%BE%B9%E7%95%8C%E6%95%B0%E6%8D%AE/&title=《爬虫| 基于高德api接口抓取景区/小区边界数据》 — 一只咸鱼&pic=http://yoursite.com/img/avatar.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=http://yoursite.com/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8E%E9%AB%98%E5%BE%B7api%E6%8E%A5%E5%8F%A3%E6%8A%93%E5%8F%96%E6%99%AF%E5%8C%BA-%E5%B0%8F%E5%8C%BA%E8%BE%B9%E7%95%8C%E6%95%B0%E6%8D%AE/&title=《爬虫| 基于高德api接口抓取景区/小区边界数据》 — 一只咸鱼&source=分享各种福利和姿势..." data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=http://yoursite.com/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8E%E9%AB%98%E5%BE%B7api%E6%8E%A5%E5%8F%A3%E6%8A%93%E5%8F%96%E6%99%AF%E5%8C%BA-%E5%B0%8F%E5%8C%BA%E8%BE%B9%E7%95%8C%E6%95%B0%E6%8D%AE/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《爬虫| 基于高德api接口抓取景区/小区边界数据》 — 一只咸鱼&url=http://yoursite.com/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8E%E9%AB%98%E5%BE%B7api%E6%8E%A5%E5%8F%A3%E6%8A%93%E5%8F%96%E6%99%AF%E5%8C%BA-%E5%B0%8F%E5%8C%BA%E8%BE%B9%E7%95%8C%E6%95%B0%E6%8D%AE/&via=http://yoursite.com" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=http://yoursite.com/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8E%E9%AB%98%E5%BE%B7api%E6%8E%A5%E5%8F%A3%E6%8A%93%E5%8F%96%E6%99%AF%E5%8C%BA-%E5%B0%8F%E5%8C%BA%E8%BE%B9%E7%95%8C%E6%95%B0%E6%8D%AE/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=http://yoursite.com/2020/04/06/%E7%88%AC%E8%99%AB-%E5%9F%BA%E4%BA%8E%E9%AB%98%E5%BE%B7api%E6%8E%A5%E5%8F%A3%E6%8A%93%E5%8F%96%E6%99%AF%E5%8C%BA-%E5%B0%8F%E5%8C%BA%E8%BE%B9%E7%95%8C%E6%95%B0%E6%8D%AE/" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: true };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>






<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>



<script>
(function() {
    var OriginTitile = document.title, titleTime;
    document.addEventListener('visibilitychange', function() {
        if (document.hidden) {
            document.title = '死鬼去哪里了！';
            clearTimeout(titleTime);
        } else {
            document.title = '(つェ⊂)咦!又好了!';
            titleTime = setTimeout(function() {
                document.title = OriginTitile;
            },2000);
        }
    });
})();
</script>



</body>
</html>
